home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / rexx / printsystemlist.clrexx < prev    next >
Encoding:
Text File  |  1995-11-26  |  2.3 KB  |  76 lines

  1. /*
  2. **  $VER: PrintSystemList.clrexx 1.0 (26 Nov 1995)
  3. **
  4. **        © 1995 Ralf Ramge
  5. **
  6. **  PROGRAMNAME:
  7. **      PrintSystemList.clrexx
  8. **
  9. **  FUNCTION:
  10. **      Gibt eine Liste der Systeme, die kein Point sind, auf dem Drucker
  11. **      aus.
  12. **
  13. */
  14.  
  15. /* cl_rexx.library öffnen */
  16.  
  17. if ~show('L','cl_rexx.library') then do
  18.     if ~addlib('cl_rexx.library',0,-30,0) then do
  19.         address command 'ASSIGN LIBS: CONNECTLINE:Libs ADD'
  20.         if ~addlib('connectline:libs/cl_rexx.library',0,-30,0) then exit 10
  21.         end
  22.     end
  23.  
  24.  
  25. anzahl=CLGET_SystemNumberOf()
  26.  
  27. do x=1 to anzahl
  28.     system.x=CLGET_SystemName(x)
  29.     domain.x=CLGET_SystemDomain(system.x)
  30.     if (left(domain.x,1)~='.')&(domain.x~='') then domain.x='.'domain.x
  31.     prio.x=CLGET_SystemPriority(system.x)
  32.     if prio.x<10 then prio.x='0'prio.x
  33.     route.x=CLGET_SystemRoute(system.x)
  34.     if route.x='' then route.x='PR/DR'
  35.     prot.x=CLGET_SystemProtocol(system.x)
  36.     pain.x=CLGET_SystemPackerIn(system.x)
  37.     if pain.x='' then pain.x='-'
  38.     paou.x=CLGET_SystemPackerOut(system.x)
  39.     if paou.x='' then paou.x='-'
  40.     pack.x=pain.x'/'paou.x
  41.     tele.x=word(translate(CLGET_SystemTelephone(system.x),' ','|'),1)
  42.     end
  43.  
  44. systembreite=10
  45. domainbreite=22
  46. priobreite=4
  47. routebreite=10
  48. protbreite=8
  49. packbreite=8
  50. telebreite=18
  51.  
  52. call print(center('Systemname',systembreite)||center('Domain',domainbreite)||center('Pr',priobreite)||center('Routing',routebreite)||center('Protokoll',protbreite)||center('Packer',packbreite)||center('Rufnummer',telebreite)||'0a'x)
  53. call print(copies('-',systembreite-1) copies('-',domainbreite-1) copies('-',priobreite-1) copies('-',routebreite-1) copies('-',protbreite-1) copies('-',packbreite-1) copies('-',telebreite-1)||'0a'x)
  54.  
  55. do x=1 to anzahl-1
  56.     if (CLGET_SystemPointuser(system.x)='')&(tele.x~='') then call print(left(system.x,systembreite)||left(domain.x,domainbreite)||left(prio.x,priobreite-1)' '||left(route.x,routebreite-1)' '||left(prot.x,protbreite)||left(pack.x,packbreite)||left(tele.x,telebreite)||'0a'x)
  57.     end
  58.  
  59. call print('0a'x)
  60. call print('PR/DR = "Palias-/Domainrouting"'||'0a'x)
  61.  
  62. exit
  63.  
  64. /* die eigentliche Druckroutine */
  65.  
  66. print:
  67. parse arg druckzeile
  68. if ~show('F','Printer') then do
  69.     if ~open('Printer','PRT:') then do
  70.         return 'ERROR'
  71.         end
  72.     end
  73. return writech('Printer',druckzeile)
  74.  
  75.  
  76.